# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-veryprettytable
_pkgname=veryprettytable
pkgver=0.8.1
pkgrel=9
pkgdesc='A simple Python library for easily displaying tabular data in a visually appealing ASCII table format.'
url='https://pypi.org/project/veryprettytable/#files'
arch=('any')
license=('BSD')
depends=('python' 'python-colorama' 'python-termcolor')
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/veryprettytable-$pkgver.tar.gz")
sha512sums=('ebdf031da50bc7e0894ea8bd1df34102ee04e11176d755c5ee04143d21af17cd40cb85b28e1bfb3a29d08d1e63d2841d4ed3a67960f76b0efe68a42e30a3dbf5')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

